Optimal. Leaf size=50 \[ \frac{2 b (a+b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0583803, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {4132, 270} \[ \frac{2 b (a+b) \tan (e+f x)}{f}-\frac{(a+b)^2 \cot (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4132
Rule 270
Rubi steps
\begin{align*} \int \csc ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b+b x^2\right )^2}{x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (2 b (a+b)+\frac{(a+b)^2}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(a+b)^2 \cot (e+f x)}{f}+\frac{2 b (a+b) \tan (e+f x)}{f}+\frac{b^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [B] time = 1.01941, size = 109, normalized size = 2.18 \[ \frac{4 \sec ^3(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (\sin (f x) \cos ^2(e+f x) \left (3 (a+b)^2 \csc (e) \cot (e+f x)+b (6 a+5 b) \sec (e)\right )+b^2 \tan (e) \cos (e+f x)+b^2 \sec (e) \sin (f x)\right )}{3 f (a \cos (2 (e+f x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.053, size = 96, normalized size = 1.9 \begin{align*}{\frac{1}{f} \left ( -{a}^{2}\cot \left ( fx+e \right ) +2\,ab \left ({\frac{1}{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-2\,\cot \left ( fx+e \right ) \right ) +{b}^{2} \left ({\frac{1}{3\,\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+{\frac{4}{3\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }}-{\frac{8\,\cot \left ( fx+e \right ) }{3}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01374, size = 73, normalized size = 1.46 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 6 \,{\left (a b + b^{2}\right )} \tan \left (f x + e\right ) - \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.482707, size = 163, normalized size = 3.26 \begin{align*} -\frac{{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \,{\left (3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.26379, size = 86, normalized size = 1.72 \begin{align*} \frac{b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 6 \, b^{2} \tan \left (f x + e\right ) - \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )}}{\tan \left (f x + e\right )}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]